<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="js/random.js" ></script>
		<script>
			var tomout = null;
			function start_time(){
				var imgs = ['img/2019-10-15_104651.png'
				,'img/2019-10-15_104652.png'
				,'img/2019-10-15_104653.png'
				,'img/2019-10-15_104654.png'
				,'img/2019-10-15_104655.png'];
				
			   var imgobj= document.getElementById('img_id');
			   var num = random(0,5);
			   imgobj.src = imgs[num];
			   tomout = setTimeout(function(){start_time()},1000);
			}
			
			
			function end_time(){
				clearTimeout(tomout);
			}
			
		</script>
	</head>
	<body>
		<img id="img_id" src="img/2019-10-15_104651.png" />
		<button onclick="start_time()">开始</button>
		<button onclick="end_time()">结束</button>
	</body>
</html>
